using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace EuropeEngulfed.NET
{
    class EuropeEngulfedColourMappedUIImage : ColourMappedUIImage
    {
        public const int GAME_DATE_BOX_SIZE = 67;
        public static int FLEET_POINT_ROWS = 4;
        public static int FLEET_POINT_GAP = 10;

        public static Point westernWeatherMarkerPoint = new Point(828,672);
        public static Point easternWeatherMarkerPoint = new Point(2954,1063);
        public static Point southernWeatherMarkerPoint = new Point(1698,1920);

        public EuropeEngulfedColourMappedUIImage()
        {
            UIRegion[] europeEngulfedRegionsTable = {new UIRegion((int)MapInfo.RegionID.Paris,System.Drawing.Color.FromArgb(165,218,206),new Point(731,1242),new Point(813,1230),new Point(729,1182),new Point(707,1128),new Point(793,1223),new Point(850,1228),new Point(734,1256),new Point(0,0), new Point(767,1210)),
                                                     new UIRegion((int)MapInfo.RegionID.Bordeaux,System.Drawing.Color.FromArgb(1,231,168),new Point(670,1337),new Point(659,1440),new Point(668,1409),new Point(640,1462),new Point(669,1333),new Point(622,1283),new Point(608,1418),new Point(605,1346), new Point(664,1362)),
                                                     new UIRegion((int)MapInfo.RegionID.FrenchAlps,System.Drawing.Color.FromArgb(85,224,82),new Point(934,1472),new Point(934,1365),new Point(930,1465),new Point(928,1516),new Point(931,1405),new Point(936,1346),new Point(978,1481),new Point(0,0), new Point(933,1422)),
                                                     new UIRegion((int)MapInfo.RegionID.Lyon,System.Drawing.Color.FromArgb(247,190,60),new Point(851,1326),new Point(788,1358),new Point(815,1349),new Point(760,1369),new Point(865,1306),new Point(901,1259),new Point(870,1360),new Point(0,0), new Point(847,1319)),
                                                     new UIRegion((int)MapInfo.RegionID.Metz,System.Drawing.Color.FromArgb(237,69,174),new Point(944,1164),new Point(894,1179),new Point(893,1161),new Point(900,1199),new Point(946,1159),new Point(954,1211),new Point(909,1111),new Point(0,0), new Point(918,1161)),
                                                     new UIRegion((int)MapInfo.RegionID.Normandy,System.Drawing.Color.FromArgb(249,244,72),new Point(581,1183),new Point(640,1143),new Point(529,1174),new Point(469,1149),new Point(605,1173),new Point(660,1179),new Point(645,1116),new Point(586,1072), new Point(602,1173)),
                                                     new UIRegion((int)MapInfo.RegionID.PaxDeCalais,System.Drawing.Color.FromArgb(92,101,199),new Point(761,1087),new Point(820,1118),new Point(755,1068),new Point(698,1062),new Point(805,1088),new Point(824,1140),new Point(853,1087),new Point(727,997), new Point(794,1082)),
                                                     new UIRegion((int)MapInfo.RegionID.Marseille,System.Drawing.Color.FromArgb(207,109,99),new Point(763,1496),new Point(842,1494),new Point(765,1486),new Point(735,1529),new Point(840,1477),new Point(857,1417),new Point(807,1530),new Point(860,1520), new Point(800,1462)),
                                                     new UIRegion((int)MapInfo.RegionID.Rhur,System.Drawing.Color.FromArgb(104,66,206),new Point(1011,923),new Point(1091,929),new Point(995,876),new Point(961,942),new Point(1085,933),new Point(1096,853),new Point(1029,933),new Point(0,0), new Point(1050,890)),
                                                     new UIRegion((int)MapInfo.RegionID.Rhineland,System.Drawing.Color.FromArgb(98,174,136),new Point(972,1052),new Point(1040,1036),new Point(960,1040),new Point(959,1082),new Point(1016,1041),new Point(1030,1085),new Point(989,1000),new Point(0,0), new Point(1007,1046)),
                                                     new UIRegion((int)MapInfo.RegionID.Baden,System.Drawing.Color.FromArgb(215,57,89),new Point(1062,1165),new Point(1109,1082),new Point(1058,1149),new Point(1021,1184),new Point(1118,1093),new Point(1115,1019),new Point(1128,1160),new Point(0,0), new Point(1108,1126)),
                                                     new UIRegion((int)MapInfo.RegionID.Bohemia,System.Drawing.Color.FromArgb(148,102,39),new Point(1236,1128),new Point(1352,1141),new Point(1243,1114),new Point(1195,1125),new Point(1315,1116),new Point(1367,1139),new Point(1272,1051),new Point(0,0), new Point(1295,1092)),
                                                     new UIRegion((int)MapInfo.RegionID.Austria,System.Drawing.Color.FromArgb(53,181,120),new Point(1212,1225),new Point(1355,1236),new Point(1205,1225),new Point(1154,1225),new Point(1281,1223),new Point(1336,1229),new Point(1298,1272),new Point(0,0), new Point(1259,1224)),
                                                     new UIRegion((int)MapInfo.RegionID.Slovakia,System.Drawing.Color.FromArgb(205,29,174),new Point(1483,1103),new Point(1569,1087),new Point(1494,1097),new Point(1449,1116),new Point(1552,1086),new Point(1603,1078),new Point(1643,1070),new Point(0,0), new Point(1543,1082)),
                                                     new UIRegion((int)MapInfo.RegionID.Berlin,System.Drawing.Color.FromArgb(121,151,123),new Point(1193,992),new Point(1178,885),new Point(1190,961),new Point(1185,1019),new Point(1191,884),new Point(1188,820),new Point(1244,950),new Point(0,0), new Point(1206,911)),
                                                     new UIRegion((int)MapInfo.RegionID.Silesia,System.Drawing.Color.FromArgb(147,125,132),new Point(1320,896),new Point(1400,1008),new Point(1353,976),new Point(1417,1033),new Point(1321,901),new Point(1314,818),new Point(1412,981),new Point(0,0),new Point(1348,947)),
                                                    new UIRegion((int)MapInfo.RegionID.EastPrussia,System.Drawing.Color.FromArgb(181,103,91),new Point(1475,749),new Point(1535,745),new Point(1475,748),new Point(1454,787),new Point(1526,741),new Point(1510,688),new Point(1508,787),new Point(0,0),new Point(1513,738)),
                                                    new UIRegion((int)MapInfo.RegionID.Piedmont,System.Drawing.Color.FromArgb(135,35,43),new Point(1018,1419),new Point(1029,1364),new Point(1001,1398),new Point(1015,1445),new Point(1051,1368),new Point(1035,1323),new Point(1049,1413),new Point(0,0),new Point(1030,1386)),
                                                    new UIRegion((int)MapInfo.RegionID.Tuscany,System.Drawing.Color.FromArgb(228,253,225),new Point(1134,1442),new Point(1197,1447),new Point(1127,1449),new Point(1081,1438),new Point(1180,1445),new Point(1225,1430),new Point(1155,1486),new Point(1154,1523),new Point(1170,1441)),
                                                    new UIRegion((int)MapInfo.RegionID.Veneto,System.Drawing.Color.FromArgb(253,226,225),new Point(1135,1333),new Point(1203,1335),new Point(1149,1324),new Point(1111,1328),new Point(1213,1323),new Point(1274,1338),new Point(1214,1368),new Point(0,0),new Point(1191,1325)),
                                                    new UIRegion((int)MapInfo.RegionID.Rome,System.Drawing.Color.FromArgb(224,226,254),new Point(1214,1525),new Point(1273,1510),new Point(1205,1524),new Point(1223,1570),new Point(1254,1503),new Point(1305,1513),new Point(1258,1545),new Point(0,0),new Point(1246,1522)),
                                                    new UIRegion((int)MapInfo.RegionID.Campania,System.Drawing.Color.FromArgb(254,251,224),new Point(1308,1594),new Point(1371,1589),new Point(1301,1593),new Point(1330,1630),new Point(1351,1577),new Point(1409,1576),new Point(1361,1621),new Point(1279,1617),new Point(1346,1592)),
                                                    new UIRegion((int)MapInfo.RegionID.Calabria,System.Drawing.Color.FromArgb(0,213,236),new Point(1432,1652),new Point(1456,1732),new Point(1446,1725),new Point(1448,1783),new Point(1435,1643),new Point(1506,1642),new Point(1543,1673),new Point(1385,1673),new Point(1442,1667)),
                                                    new UIRegion((int)MapInfo.RegionID.Sicily,System.Drawing.Color.FromArgb(170,121,215),new Point(1324,1854),new Point(1384,1857),new Point(1323,1857),new Point(1273,1851),new Point(1374,1852),new Point(1389,1899),new Point(1361,1889),new Point(1349,1888),new Point(1362,1862)),
                                                    new UIRegion((int)MapInfo.RegionID.ScottishHighlands,System.Drawing.Color.FromArgb(57,206,53),new Point(487,473),new Point(557,471),new Point(484,463),new Point(436,472),new Point(537,463),new Point(599,473),new Point(501,411),new Point(0,0),new Point(493,447)), 
                                                    new UIRegion((int)MapInfo.RegionID.Glasgow,System.Drawing.Color.FromArgb(207,99,52),new Point(490,551),new Point(559,592),new Point(453,551),new Point(411,586),new Point(515,550),new Point(568,585),new Point(483,621),new Point(0,0),new Point(501,571)),           
                                                    new UIRegion((int)MapInfo.RegionID.Liverpool,System.Drawing.Color.FromArgb(209,202,50),new Point(637,710),new Point(547,666),new Point(555,703),new Point(522,655),new Point(612,700),new Point(664,716),new Point(609,647),new Point(0,0),new Point(587,675)),        
                                                    new UIRegion((int)MapInfo.RegionID.Wales,System.Drawing.Color.FromArgb(147,185,74),new Point(507,828),new Point(562,830),new Point(502,815),new Point(452,841),new Point(573,815),new Point(569,763),new Point(487,765),new Point(0,0),new Point(526,811)),            
                                                    new UIRegion((int)MapInfo.RegionID.London,System.Drawing.Color.FromArgb(21,98,52),new Point(721,851),new Point(642,792),new Point(629,828),new Point(621,768),new Point(703,849),new Point(752,840),new Point(688,784),new Point(722,807),new Point(673,836)),         
                                                    new UIRegion((int)MapInfo.RegionID.Southampton,System.Drawing.Color.FromArgb(34,81,85),new Point(578,910),new Point(641,924),new Point(544,906),new Point(477,920),new Point(607,908),new Point(669,928),new Point(421,938),new Point(548,948),new Point(582,911)),    
                                                    new UIRegion((int)MapInfo.RegionID.Catalonia,System.Drawing.Color.FromArgb(141,214,172),new Point(649,1594),new Point(722,1599),new Point(603,1564),new Point(558,1509),new Point(665,1604),new Point(740,1603),new Point(603,1626),new Point(0,0),new Point(644,1591)),
                                                    new UIRegion((int)MapInfo.RegionID.Canabria,System.Drawing.Color.FromArgb(46,152,209),new Point(338,1503),new Point(426,1508),new Point(316,1491),new Point(247,1479),new Point(370,1490),new Point(437,1507),new Point(487,1509),new Point(273,1422),new Point(365,1494)),
                                                    new UIRegion((int)MapInfo.RegionID.Valencia,System.Drawing.Color.FromArgb(115,152,65),new Point(532,1742),new Point(521,1656),new Point(517,1669),new Point(507,1591),new Point(535,1725),new Point(555,1786),new Point(595,1702),new Point(563,1853),new Point(538,1694)),
                                                    new UIRegion((int)MapInfo.RegionID.Madrid,System.Drawing.Color.FromArgb(75,24,33),new Point(337,1674),new Point(401,1699),new Point(341,1680),new Point(294,1720),new Point(388,1641),new Point(417,1593),new Point(413,1707),new Point(0,0),new Point(381,1658)),      
                                                    new UIRegion((int)MapInfo.RegionID.Andalucia,System.Drawing.Color.FromArgb(136,133,163),new Point(328,1839),new Point(404,1846),new Point(344,1829),new Point(282,1825),new Point(401,1823),new Point(464,1841),new Point(387,1886),new Point(281,1904),new Point(375,1825)),
                                                    new UIRegion((int)MapInfo.RegionID.Portugal,System.Drawing.Color.FromArgb(182,156,192),new Point(215,1718),new Point(232,1643),new Point(236,1635),new Point(243,1574),new Point(214,1707),new Point(199,1774),new Point(188,1836),new Point(174,1668),new Point(216,1675)),
                                                    new UIRegion((int)MapInfo.RegionID.Switzerland,System.Drawing.Color.FromArgb(159,247,218),new Point(996,1268),new Point(1067,1272),new Point(990,1266),new Point(980,1308),new Point(1048,1259),new Point(1105,1274),new Point(1071,1223),new Point(0,0),new Point(1021,1264)),
                                                    new UIRegion((int)MapInfo.RegionID.Belgium,System.Drawing.Color.FromArgb(60,98,65),new Point(832,1007),new Point(883,1010),new Point(824,999),new Point(777,989),new Point(878,998),new Point(912,1046),new Point(851,967),new Point(802,954),new Point(859,1003)),
                                                    new UIRegion((int)MapInfo.RegionID.TheNetherlands,System.Drawing.Color.FromArgb(129,137,20),new Point(918,875),new Point(872,919),new Point(866,884),new Point(839,921),new Point(917,869),new Point(924,910),new Point(890,927),new Point(0,0),new Point(896,897)),
                                                    new UIRegion((int)MapInfo.RegionID.Denmark,System.Drawing.Color.FromArgb(206,199,214),new Point(1016,710),new Point(1050,657),new Point(1025,661),new Point(1066,611),new Point(1013,724),new Point(1077,737),new Point(1091,673),new Point(979,669),new Point(1035,689)),
                                                    new UIRegion((int)MapInfo.RegionID.Bergen,System.Drawing.Color.FromArgb(81,128,96),new Point(941,370),new Point(963,479),new Point(964,387),new Point(947,315),new Point(966,437),new Point(976,495),new Point(892,357),new Point(0,0),new Point(965,415)),            
                                                    new UIRegion((int)MapInfo.RegionID.Oslo,System.Drawing.Color.FromArgb(197,12,197),new Point(1055,340),new Point(1100,384),new Point(1067,360),new Point(1043,316),new Point(1074,434),new Point(1059,486),new Point(1111,377),new Point(1096,479),new Point(1075,374)),
                                                    new UIRegion((int)MapInfo.RegionID.Trondheim,System.Drawing.Color.FromArgb(128,159,159),new Point(1065,184),new Point(1050,240),new Point(1105,116),new Point(1130,53),new Point(1071,188),new Point(1045,242),new Point(1027,179),new Point(1060,136),new Point(1077,149)),
                                                    new UIRegion((int)MapInfo.RegionID.Gotaland,System.Drawing.Color.FromArgb(133,135,56),new Point(1175,591),new Point(1245,592),new Point(1184,585),new Point(1132,548),new Point(1235,588),new Point(1211,656),new Point(1278,618),new Point(1177,696),new Point(1213,597)),
                                                    new UIRegion((int)MapInfo.RegionID.Stockholm,System.Drawing.Color.FromArgb(234,250,33),new Point(1180,478),new Point(1241,495),new Point(1186,456),new Point(1137,493),new Point(1254,456),new Point(1274,384),new Point(1226,499),new Point(0,0),new Point(1228,458)),
                                                    new UIRegion((int)MapInfo.RegionID.Jamtland,System.Drawing.Color.FromArgb(85,200,255),new Point(1184,221),new Point(1244,290),new Point(1230,233),new Point(1179,180),new Point(1237,291),new Point(1164,315),new Point(1160,241),new Point(0,0),new Point(1200,249)),
                                                    new UIRegion((int)MapInfo.RegionID.Lappland,System.Drawing.Color.FromArgb(252,61,39),new Point(1215,94),new Point(1289,118),new Point(1242,97),new Point(1184,93),new Point(1298,93),new Point(1316,139),new Point(1356,80),new Point(0,0),new Point(1261,88)),
                                                    new UIRegion((int)MapInfo.RegionID.Helsinki,System.Drawing.Color.FromArgb(237,164,54),new Point(1462,216),new Point(1513,306),new Point(1458,233),new Point(1446,172),new Point(1495,281),new Point(1547,316),new Point(1435,309),new Point(1404,234),new Point(1482,261)),
                                                    new UIRegion((int)MapInfo.RegionID.Karelia,System.Drawing.Color.FromArgb(72,237,54),new Point(1572,155),new Point(1660,221),new Point(1642,192),new Point(1696,221),new Point(1595,133),new Point(1535,80),new Point(1616,247),new Point(0,0),new Point(1610,139)),
                                                    new UIRegion((int)MapInfo.RegionID.Lodz,System.Drawing.Color.FromArgb(238,240,159),new Point(1447,885),new Point(1534,976),new Point(1451,882),new Point(1423,832),new Point(1510,946),new Point(1566,992),new Point(1390,877),new Point(0,0),new Point(1481,912)),     
                                                    new UIRegion((int)MapInfo.RegionID.Lublin,System.Drawing.Color.FromArgb(84,216,117),new Point(1663,997),new Point(1709,1048),new Point(1670,979),new Point(1665,918),new Point(1695,1030),new Point(1735,1056),new Point(1627,954),new Point(0,0),new Point(1682,976)), 
                                                    new UIRegion((int)MapInfo.RegionID.Warsaw,System.Drawing.Color.FromArgb(63,177,78),new Point(1573,873),new Point(1629,852),new Point(1617,845),new Point(1625,787),new Point(1558,844),new Point(1570,897),new Point(1660,864),new Point(0,0),new Point(1601,844)),
                                                    new UIRegion((int)MapInfo.RegionID.Lvov,System.Drawing.Color.FromArgb(240,0,6),new Point(1787,945),new Point(1801,1027),new Point(1782,948),new Point(1803,895),new Point(1785,1003),new Point(1832,1038),new Point(1741,936),new Point(0,0),new Point(1786,972)),      
                                                    new UIRegion((int)MapInfo.RegionID.BrestLitovsk,System.Drawing.Color.FromArgb(138,130,123),new Point(1714,764),new Point(1742,860),new Point(1714,746),new Point(1721,651),new Point(1718,818),new Point(1736,867),new Point(1784,830),new Point(0,0),new Point(1727,794)),
                                                    new UIRegion((int)MapInfo.RegionID.Lithuania,System.Drawing.Color.FromArgb(255,13,0),new Point(1526,609),new Point(1606,683),new Point(1597,661),new Point(1652,689),new Point(1547,627),new Point(1501,573),new Point(1484,614),new Point(1495,524),new Point(1572,640)),
                                                    new UIRegion((int)MapInfo.RegionID.Latvia,System.Drawing.Color.FromArgb(132,123,124),new Point(1608,534),new Point(1659,594),new Point(1666,534),new Point(1683,473),new Point(1615,536),new Point(1637,593),new Point(1579,511),new Point(0,0),new Point(1650,529)),   
                                                    new UIRegion((int)MapInfo.RegionID.Estonia,System.Drawing.Color.FromArgb(146,109,142),new Point(1573,430),new Point(1636,439),new Point(1623,425),new Point(1637,376),new Point(1573,431),new Point(1530,433),new Point(1584,377),new Point(0,0),new Point(1597,419)),  
                                                    new UIRegion((int)MapInfo.RegionID.Zagreb,System.Drawing.Color.FromArgb(163,78,160),new Point(1418,1399),new Point(1487,1442),new Point(1477,1430),new Point(1552,1471),new Point(1416,1397),new Point(1354,1347),new Point(1498,1480),new Point(0,0),new Point(1459,1420)),
                                                    new UIRegion((int)MapInfo.RegionID.Belgrade,System.Drawing.Color.FromArgb(120,196,218),new Point(1479,1336),new Point(1596,1378),new Point(1563,1353),new Point(1620,1379),new Point(1504,1337),new Point(1449,1330),new Point(1551,1296),new Point(0,0),new Point(1551,1332)),
                                                    new UIRegion((int)MapInfo.RegionID.Skopje,System.Drawing.Color.FromArgb(12,23,41),new Point(1670,1505),new Point(1670,1429),new Point(1684,1516),new Point(1690,1573),new Point(1672,1464),new Point(1676,1399),new Point(1627,1475),new Point(0,0),new Point(1681,1484)),
                                                    new UIRegion((int)MapInfo.RegionID.Albania,System.Drawing.Color.FromArgb(43,41,11),new Point(1610,1551),new Point(1627,1615),new Point(1619,1619),new Point(1634,1661),new Point(1613,1567),new Point(1595,1519),new Point(1659,1617),new Point(0,0),new Point(1621,1582)),
                                                    new UIRegion((int)MapInfo.RegionID.NorthernGreece,System.Drawing.Color.FromArgb(171,162,44),new Point(1697,1668),new Point(1772,1682),new Point(1753,1691),new Point(1810,1687),new Point(1705,1659),new Point(1739,1616),new Point(1677,1707),new Point(0,0),new Point(1726,1657)),
                                                    new UIRegion((int)MapInfo.RegionID.Thessalonika,System.Drawing.Color.FromArgb(162,53,86),new Point(1786,1577),new Point(1853,1555),new Point(1857,1560),new Point(1906,1529),new Point(1811,1594),new Point(1770,1572),new Point(1813,1551),new Point(1832,1625),new Point(1809,1569)),
                                                    new UIRegion((int)MapInfo.RegionID.Athens,System.Drawing.Color.FromArgb(70,78,145),new Point(1738,1778),new Point(1796,1818),new Point(1750,1803),new Point(1715,1744),new Point(1806,1775),new Point(1865,1766),new Point(1804,1844),new Point(1772,1845),new Point(1772,1782)),
                                                    new UIRegion((int)MapInfo.RegionID.Crete,System.Drawing.Color.FromArgb(141,73,84),new Point(1891,1877),new Point(1958,1874),new Point(1950,1876),new Point(2000,1868),new Point(1903,1878),new Point(1864,1873),new Point(1929,1888),new Point(0,0),new Point(1926,1876)),
                                                    new UIRegion((int)MapInfo.RegionID.Budapest,System.Drawing.Color.FromArgb(242,191,221),new Point(1476,1230),new Point(1555,1222),new Point(1557,1208),new Point(1624,1221),new Point(1504,1208),new Point(1447,1230),new Point(1593,1154),new Point(0,0),new Point(1533,1197)),
                                                    new UIRegion((int)MapInfo.RegionID.Ruthenia,System.Drawing.Color.FromArgb(208,213,159),new Point(1701,1126),new Point(1795,1117),new Point(1762,1126),new Point(1829,1102),new Point(1697,1126),new Point(1645,1128),new Point(1680,1165),new Point(0,0),new Point(1731,1124)),
                                                    new UIRegion((int)MapInfo.RegionID.Bessarabia,System.Drawing.Color.FromArgb(237,234,120),new Point(1923,1119),new Point(1993,1192),new Point(1978,1180),new Point(2021,1237),new Point(1934,1125),new Point(1884,1072),new Point(2040,1197),new Point(0,0),new Point(1958,1142)),
                                                    new UIRegion((int)MapInfo.RegionID.Bucharest,System.Drawing.Color.FromArgb(248,242,22),new Point(1854,1223),new Point(1914,1270),new Point(1916,1292),new Point(1972,1303),new Point(1868,1239),new Point(1857,1177),new Point(1861,1305),new Point(0,0),new Point(1886,1245)),
                                                    new UIRegion((int)MapInfo.RegionID.Ploesti,System.Drawing.Color.FromArgb(241,98,29),new Point(1708,1315),new Point(1725,1251),new Point(1746,1283),new Point(1799,1346),new Point(1684,1288),new Point(1696,1228),new Point(1732,1337),new Point(0,0),new Point(1738,1283)),
                                                    new UIRegion((int)MapInfo.RegionID.Bulgaria,System.Drawing.Color.FromArgb(194,99,75),new Point(1791,1431),new Point(1876,1433),new Point(1864,1425),new Point(1942,1386),new Point(1800,1456),new Point(1761,1407),new Point(1858,1482),new Point(0,0),new Point(1839,1439)),
                                                    new UIRegion((int)MapInfo.RegionID.Istanbul,System.Drawing.Color.FromArgb(141,180,243),new Point(1936,1539),new Point(1989,1506),new Point(2003,1492),new Point(2036,1498),new Point(1955,1497),new Point(1943,1539),new Point(1984,1467),new Point(1917,1575),new Point(1963,1497)),
                                                    new UIRegion((int)MapInfo.RegionID.Izmir,System.Drawing.Color.FromArgb(181,167,192),new Point(2021,1683),new Point(2013,1596),new Point(2062,1624),new Point(2072,1691),new Point(2002,1624),new Point(1940,1609),new Point(2003,1688),new Point(2035,1758),new Point(2047,1622)),
                                                    new UIRegion((int)MapInfo.RegionID.Ankara,System.Drawing.Color.FromArgb(79,138,87),new Point(2176,1512),new Point(2248,1469),new Point(2252,1527),new Point(2273,1450),new Point(2192,1529),new Point(2159,1576),new Point(2201,1460),new Point(0,0),new Point(2210,1507)),
                                                    new UIRegion((int)MapInfo.RegionID.TaurusMountains,System.Drawing.Color.FromArgb(235,46,216),new Point(2159,1703),new Point(2238,1705),new Point(2229,1684),new Point(2271,1741),new Point(2170,1683),new Point(2135,1748),new Point(2204,1632),new Point(0,0),new Point(2196,1666)),
                                                    new UIRegion((int)MapInfo.RegionID.Cappadocia,System.Drawing.Color.FromArgb(167,155,114),new Point(2374,1628),new Point(2373,1483),new Point(2370,1551),new Point(2420,1481),new Point(2360,1610),new Point(2360,1678),new Point(2352,1470),new Point(0,0),new Point(2372,1577)),
                                                    new UIRegion((int)MapInfo.RegionID.SouthernAnatolia,System.Drawing.Color.FromArgb(61,220,188),new Point(2510,1486),new Point(2639,1539),new Point(2576,1550),new Point(2656,1549),new Point(2512,1552),new Point(2483,1623),new Point(2533,1487),new Point(0,0),new Point(2572,1532)),
                                                    new UIRegion((int)MapInfo.RegionID.EasternAnatolia,System.Drawing.Color.FromArgb(81,143,174),new Point(2633,1423),new Point(2763,1472),new Point(2730,1464),new Point(2777,1509),new Point(2666,1443),new Point(2603,1418),new Point(2789,1455),new Point(0,0),new Point(2701,1448)),
                                                    new UIRegion((int)MapInfo.RegionID.UralMountains,System.Drawing.Color.FromArgb(32,58,22),new Point(2884,89),new Point(2950,222),new Point(3019,154),new Point(3089,150),new Point(2925,156),new Point(2855,152),new Point(3010,253),new Point(0,0),new Point(2991,145)),
                                                    new UIRegion((int)MapInfo.RegionID.Ufa,System.Drawing.Color.FromArgb(230,170,89),new Point(3062,581),new Point(3045,766),new Point(3037,707),new Point(3095,649),new Point(2971,705),new Point(2966,758),new Point(3043,825),new Point(0,0),new Point(3030,664)),
                                                    new UIRegion((int)MapInfo.RegionID.Guryev,System.Drawing.Color.FromArgb(32,147,135),new Point(2877,847),new Point(2940,930),new Point(2944,896),new Point(2987,943),new Point(2893,864),new Point(2906,802),new Point(2926,943),new Point(0,0),new Point(2929,873)),    
                                                    new UIRegion((int)MapInfo.RegionID.Kazan,System.Drawing.Color.FromArgb(111,33,143),new Point(2813,434),new Point(2924,368),new Point(2921,427),new Point(2983,425),new Point(2823,432),new Point(2758,429),new Point(2924,497),new Point(0,0),new Point(2883,413)),     
                                                    new UIRegion((int)MapInfo.RegionID.Kuibyshev,System.Drawing.Color.FromArgb(117,217,187),new Point(2813,725),new Point(2855,595),new Point(2869,628),new Point(2931,592),new Point(2811,666),new Point(2792,738),new Point(2821,567),new Point(0,0),new Point(2832,656)),
                                                    new UIRegion((int)MapInfo.RegionID.Stalingrad,System.Drawing.Color.FromArgb(236,43,15),new Point(2725,983),new Point(2812,986),new Point(2802,963),new Point(2869,976),new Point(2740,961),new Point(2721,1016),new Point(2797,1038),new Point(0,0),new Point(2776,960)),
                                                    new UIRegion((int)MapInfo.RegionID.SouthernSteppes,System.Drawing.Color.FromArgb(31,126,100),new Point(2622,1046),new Point(2664,1146),new Point(2655,1127),new Point(2694,1185),new Point(2601,1107),new Point(2588,1046),new Point(2641,1029),new Point(0,0),new Point(2634,1102)),
                                                    new UIRegion((int)MapInfo.RegionID.Krasnodar,System.Drawing.Color.FromArgb(72,70,87),new Point(2467,1102),new Point(2469,1190),new Point(2476,1144),new Point(2506,1069),new Point(2424,1156),new Point(2407,1206),new Point(2480,1210),new Point(0,0),new Point(2464,1158)),
                                                    new UIRegion((int)MapInfo.RegionID.Batumi,System.Drawing.Color.FromArgb(157,227,200),new Point(2584,1253),new Point(2681,1284),new Point(2657,1295),new Point(2703,1336),new Point(2592,1292),new Point(2569,1226),new Point(2626,1238),new Point(0,0),new Point(2633,1279)),
                                                    new UIRegion((int)MapInfo.RegionID.Grozny,System.Drawing.Color.FromArgb(201,208,176),new Point(2786,1338),new Point(2858,1354),new Point(2798,1287),new Point(2815,1215),new Point(2792,1365),new Point(2842,1400),new Point(2853,1334),new Point(0,0),new Point(2818,1324)),
                                                    new UIRegion((int)MapInfo.RegionID.Baku,System.Drawing.Color.FromArgb(179,176,208),new Point(2918,1422),new Point(2952,1356),new Point(2980,1379),new Point(3036,1357),new Point(2926,1423),new Point(2977,1462),new Point(2936,1345),new Point(0,0),new Point(2959,1395)),
                                                    new UIRegion((int)MapInfo.RegionID.Gorky,System.Drawing.Color.FromArgb(243,133,240),new Point(2688,306),new Point(2758,315),new Point(2775,259),new Point(2834,271),new Point(2695,260),new Point(2655,303),new Point(2729,324),new Point(0,0),new Point(2737,253)),    
                                                    new UIRegion((int)MapInfo.RegionID.Archangel,System.Drawing.Color.FromArgb(207,209,163),new Point(2475,102),new Point(2570,138),new Point(2609,102),new Point(2688,97),new Point(2518,108),new Point(2417,107),new Point(2624,160),new Point(0,0),new Point(2554,91)), 
                                                    new UIRegion((int)MapInfo.RegionID.Vologda,System.Drawing.Color.FromArgb(196,225,224),new Point(2415,220),new Point(2545,278),new Point(2512,240),new Point(2580,246),new Point(2439,239),new Point(2382,218),new Point(2526,295),new Point(0,0),new Point(2487,242)),  
                                                    new UIRegion((int)MapInfo.RegionID.DvinaSwamps,System.Drawing.Color.FromArgb(183,168,200),new Point(2113,91),new Point(2214,102),new Point(2204,134),new Point(2282,132),new Point(2118,138),new Point(2047,138),new Point(2187,200),new Point(0,0),new Point(2168,148)),
                                                    new UIRegion((int)MapInfo.RegionID.OnegaSwamps,System.Drawing.Color.FromArgb(37,84,38),new Point(1779,77),new Point(1903,64),new Point(1877,83),new Point(1956,74),new Point(1815,85),new Point(1741,63),new Point(1779,164),new Point(0,0),new Point(1867,87)),       
                                                    new UIRegion((int)MapInfo.RegionID.LadogaSwamps,System.Drawing.Color.FromArgb(158,189,64),new Point(1903,238),new Point(1973,318),new Point(1987,288),new Point(2055,279),new Point(1907,286),new Point(1844,278),new Point(1919,220),new Point(0,0),new Point(1952,281)),
                                                    new UIRegion((int)MapInfo.RegionID.Moscow,System.Drawing.Color.FromArgb(18,46,22),new Point(2194,383),new Point(2309,327),new Point(2327,379),new Point(2419,359),new Point(2191,381),new Point(2116,387),new Point(2329,446),new Point(0,0),new Point(2264,386)),      
                                                    new UIRegion((int)MapInfo.RegionID.Yaroslavl,System.Drawing.Color.FromArgb(166,64,234),new Point(2534,458),new Point(2594,461),new Point(2607,453),new Point(2671,482),new Point(2532,462),new Point(2478,456),new Point(2547,375),new Point(0,0),new Point(2579,436)), 
                                                    new UIRegion((int)MapInfo.RegionID.Saratov,System.Drawing.Color.FromArgb(194,198,68),new Point(2624,645),new Point(2628,712),new Point(2673,648),new Point(2739,602),new Point(2603,650),new Point(2591,721),new Point(2676,749),new Point(0,0),new Point(2659,677)),   
                                                    new UIRegion((int)MapInfo.RegionID.Voronezh,System.Drawing.Color.FromArgb(104,162,140),new Point(2363,614),new Point(2390,715),new Point(2435,643),new Point(2504,629),new Point(2355,642),new Point(2297,637),new Point(2399,735),new Point(0,0),new Point(2407,652)), 
                                                    new UIRegion((int)MapInfo.RegionID.Novgorod,System.Drawing.Color.FromArgb(77,95,121),new Point(1718,390),new Point(1779,328),new Point(1769,358),new Point(1824,343),new Point(1715,375),new Point(1687,298),new Point(1774,306),new Point(0,0),new Point(1750,341)),   
                                                    new UIRegion((int)MapInfo.RegionID.VelikiyeLuki,System.Drawing.Color.FromArgb(225,230,40),new Point(1847,410),new Point(1914,524),new Point(1924,487),new Point(1957,427),new Point(1871,488),new Point(1831,422),new Point(1913,552),new Point(0,0),new Point(1902,457)),
                                                    new UIRegion((int)MapInfo.RegionID.Tula,System.Drawing.Color.FromArgb(147,230,106),new Point(2038,500),new Point(2120,583),new Point(2116,589),new Point(2187,565),new Point(2051,591),new Point(2015,536),new Point(2039,469),new Point(0,0),new Point(2078,551)),     
                                                    new UIRegion((int)MapInfo.RegionID.Kursk,System.Drawing.Color.FromArgb(193,94,94),new Point(2209,709),new Point(2313,822),new Point(2273,811),new Point(2333,832),new Point(2209,732),new Point(2164,679),new Point(2218,655),new Point(0,0),new Point(2233,748)),      
                                                    new UIRegion((int)MapInfo.RegionID.DonRiver,System.Drawing.Color.FromArgb(112,112,112),new Point(2485,938),new Point(2541,870),new Point(2558,912),new Point(2621,885),new Point(2483,910),new Point(2438,865),new Point(2475,978),new Point(0,0),new Point(2524,905)), 
                                                    new UIRegion((int)MapInfo.RegionID.Kharkov,System.Drawing.Color.FromArgb(121,200,131),new Point(2284,1028),new Point(2352,1044),new Point(2343,1038),new Point(2261,994),new Point(2288,1038),new Point(2382,984),new Point(2341,1098),new Point(0,0),new Point(2329,1011)),
                                                    new UIRegion((int)MapInfo.RegionID.Bryansk,System.Drawing.Color.FromArgb(155,36,104),new Point(2034,864),new Point(2181,888),new Point(2155,890),new Point(2212,892),new Point(2089,894),new Point(2031,887),new Point(2003,830),new Point(0,0),new Point(2119,861)),   
                                                    new UIRegion((int)MapInfo.RegionID.Crimea,System.Drawing.Color.FromArgb(100,123,68),new Point(2207,1157),new Point(2235,1222),new Point(2221,1236),new Point(2295,1209),new Point(2208,1181),new Point(2212,1102),new Point(2140,1177),new Point(2265,1237),new Point(2209,1172)),
                                                    new UIRegion((int)MapInfo.RegionID.DneprRiverBend,System.Drawing.Color.FromArgb(157,139,34),new Point(2040,1073),new Point(2179,1036),new Point(2135,1040),new Point(2192,1035),new Point(2083,1067),new Point(2033,1097),new Point(2058,1020),new Point(2102,1140),new Point(2104,1045)),
                                                    new UIRegion((int)MapInfo.RegionID.Kiev,System.Drawing.Color.FromArgb(30,193,193),new Point(1889,972),new Point(1960,1008),new Point(1956,973),new Point(2016,954),new Point(1900,972),new Point(1855,949),new Point(1947,1027),new Point(0,0),new Point(1950,962)),    
                                                    new UIRegion((int)MapInfo.RegionID.Smolensk,System.Drawing.Color.FromArgb(210,237,192),new Point(1957,743),new Point(2050,750),new Point(2022,734),new Point(1910,679),new Point(1956,733),new Point(2081,748),new Point(1971,648),new Point(0,0),new Point(1979,698)), 
                                                    new UIRegion((int)MapInfo.RegionID.PripetMarshes,System.Drawing.Color.FromArgb(238,190,125),new Point(1837,743),new Point(1861,847),new Point(1872,826),new Point(1918,857),new Point(1834,777),new Point(1786,722),new Point(1857,882),new Point(0,0),new Point(1863,794)),
                                                    new UIRegion((int)MapInfo.RegionID.Minsk,System.Drawing.Color.FromArgb(169,233,50),new Point(1775,529),new Point(1824,636),new Point(1817,594),new Point(1844,652),new Point(1772,530),new Point(1759,462),new Point(1791,656),new Point(0,0),new Point(1803,570)),     
                                                    new UIRegion((int)MapInfo.RegionID.Persia,System.Drawing.Color.FromArgb(211,145,71),new Point(2858,1537),new Point(2964,1558),new Point(2939,1546),new Point(3007,1540),new Point(2874,1543),new Point(2850,1489),new Point(2938,1599),new Point(0,0),new Point(2913,1545)),
                                                    new UIRegion((int)MapInfo.RegionID.NorthernIraq,System.Drawing.Color.FromArgb(54,209,16),new Point(2737,1647),new Point(2836,1658),new Point(2836,1657),new Point(2909,1658),new Point(2766,1658),new Point(2718,1616),new Point(2778,1588),new Point(0,0),new Point(2802,1634)),
                                                    new UIRegion((int)MapInfo.RegionID.SouthernIraq,System.Drawing.Color.FromArgb(222,67,83),new Point(2639,1840),new Point(2707,1794),new Point(2705,1779),new Point(2783,1751),new Point(2639,1838),new Point(2581,1896),new Point(2650,1766),new Point(0,0),new Point(2690,1780)),
                                                    new UIRegion((int)MapInfo.RegionID.Transjordan,System.Drawing.Color.FromArgb(135,80,97),new Point(2425,2018),new Point(2494,1983),new Point(2467,1983),new Point(2534,1981),new Point(2442,2036),new Point(2482,2066),new Point(2418,1960),new Point(0,0),new Point(2451,2001)),
                                                    new UIRegion((int)MapInfo.RegionID.Syria,System.Drawing.Color.FromArgb(155,117,123),new Point(2495,1760),new Point(2583,1697),new Point(2557,1711),new Point(2620,1670),new Point(2500,1783),new Point(2453,1761),new Point(2499,1706),new Point(0,0),new Point(2531,1727)),
                                                    new UIRegion((int)MapInfo.RegionID.Lebanon,System.Drawing.Color.FromArgb(255,21,21),new Point(2441,1889),new Point(2501,1868),new Point(2501,1864),new Point(2539,1851),new Point(2450,1904),new Point(2510,1916),new Point(2458,1856),new Point(0,0),new Point(2493,1881)),
                                                    new UIRegion((int)MapInfo.RegionID.Sinai,System.Drawing.Color.FromArgb(204,72,72),new Point(2365,2089),new Point(2410,2179),new Point(2409,2173),new Point(2437,2228),new Point(2376,2121),new Point(2352,2065),new Point(2435,2113),new Point(0,0),new Point(2393,2124)),
                                                    new UIRegion((int)MapInfo.RegionID.UpperEgypt,System.Drawing.Color.FromArgb(150,176,100),new Point(2307,2303),new Point(2361,2313),new Point(2374,2311),new Point(2286,2291),new Point(2320,2308),new Point(2419,2323),new Point(2366,2253),new Point(2414,2283),new Point(2350,2293)),
                                                    new UIRegion((int)MapInfo.RegionID.Alexandria,System.Drawing.Color.FromArgb(108,236,185),new Point(2244,2088),new Point(2298,2191),new Point(2281,2178),new Point(2331,2209),new Point(2250,2107),new Point(2296,2098),new Point(2270,2227),new Point(0,0),new Point(2281,2150)),
                                                    new UIRegion((int)MapInfo.RegionID.ElAlamein,System.Drawing.Color.FromArgb(65,101,44),new Point(2121,2154),new Point(2176,2154),new Point(2134,2249),new Point(2204,2256),new Point(2129,2182),new Point(2193,2172),new Point(2150,2123),new Point(0,0),new Point(2157,2174)),
                                                    new UIRegion((int)MapInfo.RegionID.WesternEgypt,System.Drawing.Color.FromArgb(218,190,31),new Point(1967,2200),new Point(2032,2202),new Point(1980,2243),new Point(2039,2251),new Point(1972,2176),new Point(2037,2166),new Point(1984,2115),new Point(0,0),new Point(2006,2180)),
                                                    new UIRegion((int)MapInfo.RegionID.Marmarica,System.Drawing.Color.FromArgb(87,9,140),new Point(1867,2140),new Point(1864,2212),new Point(1848,2238),new Point(1898,2266),new Point(1849,2172),new Point(1884,2115),new Point(1839,2103),new Point(0,0),new Point(1865,2180)),
                                                    new UIRegion((int)MapInfo.RegionID.Cyrenaica,System.Drawing.Color.FromArgb(86,81,111),new Point(1753,2104),new Point(1741,2208),new Point(1721,2240),new Point(1771,2247),new Point(1718,2172),new Point(1763,2114),new Point(1779,2177),new Point(0,0),new Point(1748,2160)),
                                                    new UIRegion((int)MapInfo.RegionID.Sirte,System.Drawing.Color.FromArgb(117,114,60),new Point(1502,2235),new Point(1610,2241),new Point(1562,2242),new Point(1636,2244),new Point(1491,2248),new Point(1444,2192),new Point(1439,2255),new Point(0,0),new Point(1545,2229)),
                                                    new UIRegion((int)MapInfo.RegionID.Tripolitania,System.Drawing.Color.FromArgb(22,245,235),new Point(1231,2197),new Point(1307,2204),new Point(1316,2202),new Point(1196,2147),new Point(1247,2203),new Point(1365,2249),new Point(1357,2131),new Point(0,0),new Point(1291,2183)),
                                                    new UIRegion((int)MapInfo.RegionID.Tunisia,System.Drawing.Color.FromArgb(64,184,255),new Point(1076,2032),new Point(1139,2039),new Point(1057,2026),new Point(1057,1954),new Point(1137,2026),new Point(1145,2082),new Point(1158,1957),new Point(0,0),new Point(1111,1994)),
                                                    new UIRegion((int)MapInfo.RegionID.EastAlgeria,System.Drawing.Color.FromArgb(150,255,34),new Point(877,2049),new Point(949,2039),new Point(888,2052),new Point(855,1983),new Point(952,2054),new Point(975,1979),new Point(914,1977),new Point(0,0),new Point(925,2017)),
                                                    new UIRegion((int)MapInfo.RegionID.Algiers,System.Drawing.Color.FromArgb(254,150,35),new Point(676,2038),new Point(733,2031),new Point(662,2054),new Point(616,2004),new Point(729,2053),new Point(775,1995),new Point(610,2070),new Point(654,1964),new Point(717,2035)),
                                                    new UIRegion((int)MapInfo.RegionID.Oran,System.Drawing.Color.FromArgb(255,34,217),new Point(455,2065),new Point(532,2057),new Point(457,2077),new Point(430,2008),new Point(511,2077),new Point(544,2022),new Point(492,2027),new Point(0,0),new Point(493,2067)),      
                                                    new UIRegion((int)MapInfo.RegionID.Morocco,System.Drawing.Color.FromArgb(75,197,160),new Point(272,2078),new Point(352,2077),new Point(265,2079),new Point(164,2097),new Point(333,2083),new Point(361,2029),new Point(297,2007),new Point(245,2031),new Point(321,2062)),
                                                    new UIRegion((int)MapInfo.RegionID.Sardinia,System.Drawing.Color.FromArgb(191,139,199),new Point(1084,1706),new Point(1086,1759),new Point(1067,1762),new Point(1109,1782),new Point(1082,1715),new Point(1109,1669),new Point(1112,1742),new Point(1047,1677),new Point(1088,1722)),
                                                    new UIRegion((int)MapInfo.RegionID.Corsica,System.Drawing.Color.FromArgb(162,185,153),new Point(1097,1559),new Point(1091,1608),new Point(1085,1559),new Point(1110,1582),new Point(1080,1609),new Point(1090,1635),new Point(1071,1580),new Point(1075,1595),new Point(1091,1590)),
                                                    new UIRegion((int)MapInfo.RegionID.USA,System.Drawing.Color.FromArgb(125,174,117),new Point(194,160),new Point(276,154),new Point(188,158),new Point(125,142),new Point(257,159),new Point(335,170),new Point(0,0),new Point(0,0),new Point(226,158)),                 
                                                    new UIRegion((int)MapInfo.RegionID.Cyprus,System.Drawing.Color.FromArgb(119,49,121),new Point(2297,1831),new Point(2350,1796),new Point(2321,1815),new Point(2359,1788),new Point(2270,1833),new Point(2296,1858),new Point(2318,1840),new Point(2288,1849),new Point(2305,1832)),
                                                    new UIRegion((int)MapInfo.RegionID.Malta,System.Drawing.Color.FromArgb(208,32,45),new Point(1339,1954),new Point(1365,1962),new Point(1426,2018),new Point(1377,2018),new Point(1478,2018),new Point(1535,2018),new Point(0,0),new Point(1342,1964),new Point(1452,2019)),                       
                                                    new UISeaRegion((int)MapInfo.RegionID.BalticSea,System.Drawing.Color.FromArgb(139,175,65),new Point(1273,682),new Point(0,0),new Point(0,0),new Point(0,0),new Point(1345,485)),
                                                    new UISeaRegion((int)MapInfo.RegionID.AtlanticOcean,System.Drawing.Color.FromArgb(224,219,16),new Point(830,747),new Point(218,1291),new Point(665,505),new Point(0,0),new Point(0,0)),
                                                    new UISeaRegion((int)MapInfo.RegionID.MediteraneanSea,System.Drawing.Color.FromArgb(249,53,249),new Point(0,0),new Point(835,1660),new Point(765,1790),new Point(1455,1885),new Point(0,0)),
                                                    new UISeaRegion((int)MapInfo.RegionID.BlackSea,System.Drawing.Color.FromArgb(117,122,185),new Point(0,0),new Point(0,0),new Point(0,0),new Point(0,0),new Point(2180,1320)),
                                                    new UISeaRegion((int)MapInfo.RegionID.RedSea,System.Drawing.Color.FromArgb(237,216,65),new Point(0,0),new Point(0,0),new Point(0,0),new Point(0,0),new Point(0,0)),
                                                    new UIRegion((int)MapInfo.RegionID.Leningrad,System.Drawing.Color.FromArgb(124,116,120),new Point(1424,420),new Point(0,0),new Point(1419, 414),new Point(1473,414),new Point(1478,415),new Point(1514,392),new Point(0,0),new Point(0,0) ,new Point(1457,414)),                  
                                                    new UIRegion((int)MapInfo.RegionID.Gibraltar,System.Drawing.Color.FromArgb(141,117,99),new Point(160,1953),new Point(0,0),new Point(156,1948),new Point(105,1949),new Point(215,1948),new Point(266,1949),new Point(0,0),new Point(0,0),new Point(194,1954)),                     
                                                    new UIRegion((int)MapInfo.RegionID.Tobruk,System.Drawing.Color.FromArgb(81,159,90),new Point(1913,1994),new Point(0,0),new Point(1879, 1997),new Point(1830,1997),new Point(1944,1997),new Point(1999,1995),new Point(0,0),new Point(0,0),new Point(1913,1996)),                     
                                                    new UIRegion((int)MapInfo.RegionID.Sevastopol,System.Drawing.Color.FromArgb(103,137,112),new Point(2091,1272),new Point(0,0),new Point(2073, 1274),new Point(2029,1289),new Point(2133,1271),new Point(2183,1285),new Point(0,0),new Point(0,0),new Point(2102,1273)),
                                                     };
            mainImage = EEGraphics.mainEEMap;
            mappedUIImage = EEGraphics.mainEEMappedUI;
            this.UIRegions = new List<UIRegion>();
            this.UIRegions.AddRange(europeEngulfedRegionsTable);

            //Verify uniqueness of mapped UI
            for (int iUIRegion = 0; iUIRegion < (this.UIRegions.Count - 1); iUIRegion++)
            {
                for (int iUIRegionInner = iUIRegion + 1; iUIRegionInner < this.UIRegions.Count; iUIRegionInner++)
                {
                    if (this.UIRegions[iUIRegion].MappedUIColor.Equals(this.UIRegions[iUIRegionInner].MappedUIColor))
                        System.Diagnostics.Debug.Assert(false, "Non-unique map colour found in mapped UI");
                    if (this.UIRegions[iUIRegion].RegionID == this.UIRegions[iUIRegionInner].RegionID)
                        System.Diagnostics.Debug.Assert(false, "Non-unique region ID found in mapped UI");
                }
            }
        }

        public UIRegion GetUIRegionAt(int index)
        {
            if (index < this.UIRegions.Count)
                return this.UIRegions[index];
            return null;
        }

        public UIRegion GetUIRegion(MapInfo.RegionID regionID)
        {
            foreach (UIRegion uiRegion in UIRegions)
            {
                if ((MapInfo.RegionID)uiRegion.RegionID == regionID)
                {
                    return uiRegion;
                }
            }
            return null;
        }

        public bool IsMouseOverCentredBlocks(ref MapInfo.RegionID regionID, Point mousePt, Size blockSize)
        {
            foreach (UIRegion uiRegion in UIRegions)
            {
                if(MapInfo.IsLandRegion((MapInfo.RegionID)uiRegion.RegionID))
                {
                    Rectangle blockRect = new Rectangle(uiRegion.PointForCentredBlocks.X - (blockSize.Width / 2), uiRegion.PointForCentredBlocks.Y - (blockSize.Height / 2), blockSize.Width, blockSize.Height);
                    if (blockRect.Contains(mousePt))
                    {
                        regionID = (MapInfo.RegionID)uiRegion.RegionID;
                        return true;
                    }
                }
            }
            return false;
        }

        public bool IsMouseOverContestedBlocks1(ref MapInfo.RegionID regionID, Point mousePt, Size blockSize)
        {
            foreach (UIRegion uiRegion in UIRegions)
            {
                if (MapInfo.IsLandRegion((MapInfo.RegionID)uiRegion.RegionID))
                {
                    Rectangle blockRect = new Rectangle(uiRegion.PointForContestedBlocks1.X - (blockSize.Width / 2), uiRegion.PointForContestedBlocks1.Y - (blockSize.Height / 2), blockSize.Width, blockSize.Height);
                    if (blockRect.Contains(mousePt))
                    {
                        regionID = (MapInfo.RegionID)uiRegion.RegionID;
                        return true;
                    }
                }
            }
            return false;
        }

        public bool IsMouseOverContestedBlocks2(ref MapInfo.RegionID regionID, Point mousePt, Size blockSize)
        {
            foreach (UIRegion uiRegion in UIRegions)
            {
                if (MapInfo.IsLandRegion((MapInfo.RegionID)uiRegion.RegionID))
                {
                    Rectangle blockRect = new Rectangle(uiRegion.PointForContestedBlocks2.X - (blockSize.Width / 2), uiRegion.PointForContestedBlocks2.Y - (blockSize.Height / 2), blockSize.Width, blockSize.Height);
                    if (blockRect.Contains(mousePt))
                    {
                        regionID = (MapInfo.RegionID)uiRegion.RegionID;
                        return true;
                    }
                }
            }
            return false;
        }

        public bool IsMouseOverCentredGSU(ref MapInfo.RegionID regionID, Point mousePt, Size GSUSize)
        {
            foreach (UIRegion uiRegion in UIRegions)
            {
                if (MapInfo.IsLandRegion((MapInfo.RegionID)uiRegion.RegionID))
                {
                    Rectangle GSURect = new Rectangle(uiRegion.PointForCentredGSU.X - (GSUSize.Width / 2), uiRegion.PointForCentredGSU.Y - (GSUSize.Height / 2), GSUSize.Width, GSUSize.Height);
                    if (GSURect.Contains(mousePt))
                    {
                        regionID = (MapInfo.RegionID)uiRegion.RegionID;
                        return true;
                    }
                }
            }
            return false;
        }

        public bool IsMouseOverContestedGSU1(ref MapInfo.RegionID regionID, Point mousePt, Size GSUSize)
        {
            foreach (UIRegion uiRegion in UIRegions)
            {
                if (MapInfo.IsLandRegion((MapInfo.RegionID)uiRegion.RegionID))
                {
                    Rectangle GSURect = new Rectangle(uiRegion.PointForContestedGSU1.X - (GSUSize.Width / 2), uiRegion.PointForContestedGSU1.Y - (GSUSize.Height / 2), GSUSize.Width, GSUSize.Height);
                    if (GSURect.Contains(mousePt))
                    {
                        regionID = (MapInfo.RegionID)uiRegion.RegionID;
                        return true;
                    }
                }
            }
            return false;
        }

        public bool IsMouseOverContestedGSU2(ref MapInfo.RegionID regionID, Point mousePt, Size GSUSize)
        {
            foreach (UIRegion uiRegion in UIRegions)
            {
                if (MapInfo.IsLandRegion((MapInfo.RegionID)uiRegion.RegionID))
                {
                    Rectangle GSURect = new Rectangle(uiRegion.PointForContestedGSU2.X - (GSUSize.Width / 2), uiRegion.PointForContestedGSU2.Y - (GSUSize.Height / 2), GSUSize.Width, GSUSize.Height);
                    if (GSURect.Contains(mousePt))
                    {
                        regionID = (MapInfo.RegionID)uiRegion.RegionID;
                        return true;
                    }
                }
            }
            return false;
        }

        public bool IsMouseOverRegion(ref MapInfo.RegionID regionID, Point mousePt)
        {
            Color c = this.mappedUIImage.GetPixel(mousePt.X, mousePt.Y);
            foreach (UIRegion uiRegion in UIRegions)
            {
                if(uiRegion.MappedUIColor == c)
                {
                    regionID = (MapInfo.RegionID)uiRegion.RegionID;
                    return true;
                }
            }

            return false;
        }

        public void SetGSUDisplayIndex(Point mousePt, Size GSUSize, List<GroundSupportUnit> alliedGSUList, List<GroundSupportUnit> axisGSUList, List<Block> alliedBlockList, List<Block> axisBlockList, bool bDecrement)
        {
            MapInfo.RegionID regionID = MapInfo.RegionID.Alexandria;
            if (IsMouseOverCentredGSU(ref regionID, mousePt, GSUSize))
            {
                UIRegion uiRegion = GetUIRegion(regionID);
                if (uiRegion != null)
                {
                    if ((alliedGSUList.Count > 0 && axisBlockList.Count <= 0))
                    {
                        if (bDecrement)
                            uiRegion.AlliedGSUIndex--;
                        else
                            uiRegion.AlliedGSUIndex++;
                        return;
                    }
                    else if (axisGSUList.Count > 0 && alliedBlockList.Count <= 0)
                    {
                        if (bDecrement)
                            uiRegion.AlliedGSUIndex--;
                        else
                            uiRegion.AxisGSUIndex++;
                    }
                }
            }

            if (IsMouseOverContestedGSU1(ref regionID, mousePt, GSUSize))
            {
                UIRegion uiRegion = GetUIRegion(regionID);
                if (uiRegion != null)
                {
                    if ((alliedGSUList.Count > 0 && axisBlockList.Count > 0))
                    {
                        if(bDecrement)
                            uiRegion.AlliedGSUIndex--;
                        else
                            uiRegion.AlliedGSUIndex++;
                        return;
                    }
                }
            }

            if (IsMouseOverContestedGSU2(ref regionID, mousePt, GSUSize))
            {
                UIRegion uiRegion = GetUIRegion(regionID);
                if (uiRegion != null)
                {
                    if ((axisGSUList.Count > 0 && alliedBlockList.Count > 0))
                    {
                        if(bDecrement)
                            uiRegion.AxisGSUIndex--;
                        else
                            uiRegion.AxisGSUIndex++;
                        return;
                    }
                }
            }
        }

        public void SetBlockDisplayIndex(Point mousePt, Size blockSize, List<Block> alliedBlockList, List<Block> axisBlockList, bool bDecrement)
        {
            MapInfo.RegionID regionID = MapInfo.RegionID.Alexandria;
            if(IsMouseOverCentredBlocks(ref regionID,mousePt,blockSize))
            {
                UIRegion uiRegion = GetUIRegion(regionID);
                if(uiRegion != null)
                {
                    if (((alliedBlockList.Count != 2 && alliedBlockList.Count > 0) && axisBlockList.Count == 0) || (alliedBlockList.Count == 0 && (axisBlockList.Count != 2 && axisBlockList.Count > 0)))
                    {
                        if(bDecrement)
                            uiRegion.CentredBlockIndex--;
                        else
                            uiRegion.CentredBlockIndex++;
                        return;
                    }
                }
            }
            
            if(IsMouseOverContestedBlocks1(ref regionID,mousePt, blockSize))
            {
                UIRegion uiRegion = GetUIRegion(regionID);
                if (uiRegion != null)
                {
                    if (alliedBlockList.Count == 2 || axisBlockList.Count == 2 || (axisBlockList.Count > 0 && alliedBlockList.Count > 0))
                    {
                        if(bDecrement)
                            uiRegion.AlliedBlockIndex--;
                        else
                            uiRegion.AlliedBlockIndex++;
                        return;
                    }
                }
            }
            
            if(IsMouseOverContestedBlocks2(ref regionID,mousePt, blockSize))
            {
                UIRegion uiRegion = GetUIRegion(regionID);
                if (uiRegion != null)
                {
                    if (alliedBlockList.Count == 2 || axisBlockList.Count == 2 || (axisBlockList.Count > 0 && alliedBlockList.Count > 0))
                    {
                        if(bDecrement)
                            uiRegion.AxisBlockIndex--;
                        else
                            uiRegion.AxisBlockIndex++;
                        return;
                    }
                }
            }
        }

        public Rectangle GetInformationTrackRect(int infoTrackPoints)
        {
            switch(infoTrackPoints)
            {
                case 0:
                    return new Rectangle(257, 1038, 70, 214);
                case 1:
                    return new Rectangle(50, 1038, 205, 214);
                case 2:
                    return new Rectangle(50, 895, 130, 240);
                case 3:
                case 4:
                case 5:
                case 6:
                case 7:
                case 8:
                case 9:
                case 10:
                    return new Rectangle(50, 820 - ((infoTrackPoints - 3) * 72), 130, 72);
                case 11:
                case 12:
                case 13:
                case 14:
                case 15:
                case 16:
                case 17:
                case 18:
                case 19:
                case 20:
                    return new Rectangle(180, 965 - ((infoTrackPoints - 11) * 70), 75, 70);
                case 21:
                case 22:
                case 23:
                case 24:
                case 25:
                case 26:
                case 27:
                case 28:
                case 29:
                case 30:
                    return new Rectangle(258, 965 - ((infoTrackPoints - 21) * 70), 75, 70);
                default:
                    throw new Exception("Invalid Information Track Rectangle Requested");
            }
        }

        public bool GetGameDateAtPoint(ref GameTurn.GameDate gameDate, Point ptPoint)
        {
            foreach(GameTurn.GameDate gameDateToTest in Enum.GetValues(typeof(GameTurn.GameDate)))
            {
                if (gameDateToTest != GameTurn.GameDate.JanFeb46)
                {
                    Point gameDatePoint = GetTurnMarkerPoint(gameDateToTest);
                    Rectangle rectGameDatePoint = new Rectangle(gameDatePoint.X - (GAME_DATE_BOX_SIZE / 2), gameDatePoint.Y - (GAME_DATE_BOX_SIZE / 2), GAME_DATE_BOX_SIZE, GAME_DATE_BOX_SIZE);
                    if(rectGameDatePoint.Contains(ptPoint))
                    {
                        gameDate = gameDateToTest;
                        return true;
                    }
                }
            }

            return false;
        }

        public Point GetTurnMarkerPoint(GameTurn.GameDate gameDate)
        {
            switch(gameDate)
            {
                case GameTurn.GameDate.SepOct39:
                case GameTurn.GameDate.NovDev39:
                    return new Point(100 + (65 * (int)gameDate), 2350);
                case GameTurn.GameDate.JanFeb40:
                case GameTurn.GameDate.MarApr40:
                case GameTurn.GameDate.MayJun40:
                case GameTurn.GameDate.JulAug40:
                case GameTurn.GameDate.SepOct40:
                case GameTurn.GameDate.NovDec40:
                    return new Point(100 + (65 * (int)gameDate) + 4, 2350);
                case GameTurn.GameDate.JanFeb41:
                case GameTurn.GameDate.MarApr41:
                case GameTurn.GameDate.MayJun41:
                case GameTurn.GameDate.JulAug41:
                case GameTurn.GameDate.SepOct41:
                case GameTurn.GameDate.NovDec41:
                    return new Point(100 + (65 * (int)gameDate) + 12, 2350);
                case GameTurn.GameDate.JanFeb42:
                case GameTurn.GameDate.MarApr42:
                case GameTurn.GameDate.MayJun42:
                case GameTurn.GameDate.JulAug42:
                case GameTurn.GameDate.SepOct42:
                case GameTurn.GameDate.NovDec42:
                    return new Point(100 + (65 * (int)gameDate) + 20, 2350);
                case GameTurn.GameDate.JanFeb43:
                case GameTurn.GameDate.MarApr43:
                case GameTurn.GameDate.MayJun43:
                case GameTurn.GameDate.JulAug43:
                case GameTurn.GameDate.SepOct43:
                case GameTurn.GameDate.NovDec43:
                    return new Point(100 + (65 * (int)gameDate) + 28, 2350);
                case GameTurn.GameDate.JanFeb44:
                case GameTurn.GameDate.MarApr44:
                case GameTurn.GameDate.MayJun44:
                case GameTurn.GameDate.JulAug44:
                case GameTurn.GameDate.SepOct44:
                case GameTurn.GameDate.NovDec44:
                    return new Point(100 + (65 * (int)gameDate) + 32, 2350);
                case GameTurn.GameDate.JanFeb45:
                case GameTurn.GameDate.MarApr45:
                case GameTurn.GameDate.MayJun45:
                case GameTurn.GameDate.JulAug45:
                case GameTurn.GameDate.SepOct45:
                case GameTurn.GameDate.NovDec45:
                    return new Point(100 + (65 * (int)gameDate) + 426, 2350);
                default:
                    throw new Exception("Invalid Game Date");
            }
        }
    }
}
